<template>
	<view class="barCon" :class="{'nofix': on_fix}">
		<view class="btnBox" >
			<view class="bar-item" @tap="showShareEvent">
				<view class="bar-item-v">
					<image src="/static/img/weix.png" mode="" class="bar-item-icon"></image>
				</view>
				<view class="text bar-item-v">
					分享
				</view>
			</view>
			<!-- <view class="bar-item" @tap="goServer">
				<view class="bar-item-v">
					<text class="iconfont icon-caozuo-dianhua" ></text>
				</view>
				<view class="text bar-item-v">
					客服
				</view>
			</view> -->
			<view class="bar-item" @tap="goMy">
				<view  class="bar-item-v">
					<!-- <text class="iconfont icon-wode2"></text> -->
					<image src="/static/img/myNew.png" mode="" class="bar-item-icon2"></image>
				</view>
				<view class="text bar-item-v">
					我的
				</view>
			</view>
		</view>
		<view class="upBtn" @tap="goSin" v-show="btn_type == 1 || btn_type == 2">
			参赛报名
		</view>
		<view class="upBtn" @tap="goUpLoad" v-show="btn_type == 3 || btn_type == 5">
			上传作品
		</view>
		<view class="upBtn disable" v-show="btn_type == 4">
			 已完成上传
		</view>
		<share ref="showS"></share>
	</view>
	
</template>

<script>
	import BASE_URL from '../../util/path';
	export default {
		name:"barCon",
		data() {
			return {
				
			};
		},
		created() {
			// if(this.$route.query.type == "top" ) {
			// 	this.getIS_upTop()
			// } else {
			// 	
			// }
			// this.getIS_up()
			// console.log(this.is_up);
			// console.log(this.is_up);
			//console.log(this.on_fix);
		},
		props:['btn_type','on_fix'],
		methods:{
			goSin() {
				uni.navigateTo({
					url:'/pages/sigUP/sigUP'
				})
			},
			showShare() {
				this.showShareEvent();
			},
			showShareEvent() {
				this.$refs.showS.show();
			},
			goSin() {
				uni.navigateTo({
				    url:'/pages/sigUP/sigUP' 
				})
			},
			goUpLoad() {
				uni.navigateTo({
				    url:'/pages/upLoadhs/upLoadhs' 
				})
			},
			goMy() {
				// console.log(id);
				uni.navigateTo({
					url:'/pages/my/my?id=' + BASE_URL.acitveId 
				})
			}
		}
	}
</script>

<style scoped lang="scss">
   .barCon {
	  width: 100%;
	  background-color: transparent;
	  display: flex;
	  position: fixed;
	  bottom: 54rpx;
	  left:28rpx;
	  width: 704rpx;
	  height: 140rpx;
	  background-size: contain;
	  background-image: url('@/static/img/kuang-bottom.png');
	  background-repeat: no-repeat;
	  &.nofix {
		  position: absolute;
		  bottom: 56rpx;
	  }
	  .btnBox {
		  width: 481rpx;
		  padding-left: 30rpx;
		  flex:none;
		  
		  display: flex;
		  .bar-item-v {
			  text-align: center;
			 
		  }
		  .bar-item {
			  width: 26%;
			  display: block;
			  padding-top: 24rpx;
			  .iconfont {
				font-size: 40rpx;
			  }
			  .text {
				font-size: 28rpx;
				position: relative;
				top:-4rpx;
			  }
		  }
	  }
	  .bar-item-icon {
		  width: 51rpx;
		  height: 51rpx;
	  }
	  .bar-item-icon2 {
		  width: 40rpx;
		  height: 51rpx;
	  }
	  .upBtn {
		  position: absolute;
		  right: 60rpx;
		  top: 30rpx;
		  flex:none;
		  width: 230rpx;
		  height: 80rpx;
		  color:#fff;
		  font-size: 32rpx;
          border-radius: 8rpx;
		  border:2px solid #eaa057;
		  color:#cb7622;
		  font-weight: bold;
		  background-color: #f9e791;
		  // @include center();
		  text-align: center;
		  line-height: 70rpx;
		  &.disable {
			  background-color: #ddd;
			  color:#fff;
			  border-color: #ddd;
		  }
	  }
   }
</style>